package edu.sctu.practice.class02.yangyuran.test04;

/**
 * Created by Administrator on 2015/10/11.
 */
public class Number {
    private int n1;
    private int n2;

    public Number() {
        this.n1 = 35;
        this.n2 = 25;
    }

    public void addition() {
        int add;
        add = n1 + n2;
        System.out.println("两数相加后的结果为：" + add);
    }

    public void subtration() {
        int sub;
        sub = n1 - n2;
        System.out.println("两数相减后的结果为：" + sub);
    }

    public void multiplication() {
        int mul;
        mul = n1 * n2;
        System.out.println("两数相乘后的结果为：" + mul);
    }

    public void division() {
        int div;
        div = n1 / n2;
        System.out.println("两数相除后的结果为：" + div);
    }

    public static void main(String[] args) {

        Number number = new Number();
        number.addition();
        number.subtration();
        number.multiplication();
        number.division();
    }
}
